package com.zbkj.admin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.zbkj.admin.handler.TimestampToLocalDateTimeTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 积分提现审批记录 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Accessors(chain = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "积分提现审批记录")
@TableName(value = "eb_dividend_arraign")
@Table(value = "eb_dividend_arraign")
public class EbDividendArraignEntity  implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Schema(description = "主键")
    @Id(keyType = KeyType.Auto)
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 商户id
     */
    @Schema(description = "商户id")
    @Column(value = "mer_id")
    @TableField(value = "mer_id")
    private Integer merId;

    /**
     * 商户id
     */
    @Schema(description = "商户id")
    @Column(value = "uid")
    @TableField(value = "uid")
    private Integer uId;

    /**
     * 审批状态(0:未审批,1:拒绝,2:审核通过,3:已提现到账)
     */
    @Schema(description = "审批状态(0:未审批,1:拒绝,2:审核通过,3:已提现到账)")
    @Column(value = "examine_and_approve_state")
    @TableField(value = "examine_and_approve_state")
    private Integer examineAndApproveState;

    /**
     * 审批金额
     */
    @Schema(description = "审批金额")
    @Column(value = "amount_of_money")
    @TableField(value = "amount_of_money")
    private BigDecimal amountOfMoney;

    /**
     * 实际到账金额
     */
    @Schema(description = "实际到账金额")
    @Column(value = "amount_received")
    @TableField(value = "amount_received")
    private BigDecimal amountReceived;

    /**
     * 手续费
     */
    @Schema(description = "手续费")
    @Column(value = "kickback")
    @TableField(value = "kickback")
    private BigDecimal kickback;

    @Schema(description = "提现类型(1:支付宝,2:银行卡(银联))")
    @Column(value = "type")
    @TableField(value = "type")
    private Integer type;

    @Schema(description = "账户名称（如：建设银行、工商银行）")
    @Column(value = "bank_name")
    @TableField(value = "bank_name")
    private String bankName;

    @Schema(description = "账号（根据类型填入对应账号）")
    @NotBlank(message = "提现账号不能为空")
    @Column(value = "bank_code")
    @TableField(value = "bank_code")
    private String bankCode;

    /**
     * 提审时间(提交审批时间)
     */
    @Schema(description = "提审时间(提交审批时间)")
    @Column(value = "created_time", jdbcType = JdbcType.DATE, typeHandler = TimestampToLocalDateTimeTypeHandler.class)
    @TableField(value = "created_time", jdbcType = JdbcType.DATE, typeHandler = TimestampToLocalDateTimeTypeHandler.class)
    private LocalDateTime createdTime;

    /**
     * 审批时间(后台审批通过时间)
     */
    @Schema(description = "审批时间(后台审批通过时间)")
    @Column(value = "arraign_time", jdbcType = JdbcType.DATE, typeHandler = TimestampToLocalDateTimeTypeHandler.class)
    @TableField(value = "arraign_time", jdbcType = JdbcType.DATE, typeHandler = TimestampToLocalDateTimeTypeHandler.class)
    private LocalDateTime arraignTime;

    /**
     * 操作人
     */
    @Schema(description = "操作人")
    @Column(value = "created_by")
    @TableField(value = "created_by")
    private String createdBy;

    /**
     * 备注
     */
    @Schema(description = "备注")
    @Column(value = "remarks")
    @TableField(value = "remarks")
    private String remarks;


}
